<template>
  <PageContainer :title="pageTitle">
    <div class="common-page">
      <el-card>
        <el-result
          icon="info"
          :title="pageTitle"
          sub-title="该页面正在开发中，敬请期待..."
        >
          <template #extra>
            <el-button type="primary" @click="goBack">返回</el-button>
          </template>
        </el-result>
      </el-card>
    </div>
  </PageContainer>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import PageContainer from '@/components/PageContainer.vue'

const route = useRoute()
const router = useRouter()

const pageTitle = computed(() => {
  return route.meta?.title as string || '页面开发中'
})

const goBack = () => {
  router.back()
}
</script>

<style lang="scss" scoped>
.common-page {
  .el-result {
    padding: 60px 0;
  }
}
</style>